package com.charm.nukaties.framework.nethard

import okhttp3.OkHttpClient

/**
 *
 * @author tools
 * @date 2017/12/11
 */

class OkHttpFactory {

    companion object {
        var okHttpClient: OkHttpClient? = null
        @Synchronized
        fun create(): OkHttpClient {
            if (okHttpClient == null) {
                val builder = OkHttpClient.Builder()
                okHttpClient = builder.build()
            }
            return okHttpClient!!
        }
    }
}
